


pkg load symbolic  % 如果未安装，需先运行 `pkg install -forge symbolic`
syms x;           % 声明符号变量


p = 1+x-1/(x^2);
factorized_p = factor(p);  % 因式分解
disp(factorized_p);        % 输出

p = x-4+4/x;
factorized_p = factor(p);  % 因式分解
disp(factorized_p);
